<?php

/**
 * @author Murat Cem YALIN <muratcem@gmail.com>
 * @copyright 2014 muratcem.com - walkerPHP.com
 * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, version 3
 * @version 1.0.1
 */

namespace core\Db;

interface IDb{
    /**
     * function to connect to database
     * @return boolean
     */
    public static function connect();

    /**
     * function to create ActiveRecord Class
     *
     * @param string $tableName
     * @return class
     */
    public static function table($tableName = '');

    /**
     * function to run raw query on database
     *
     * @param string $QueryString
     * @param null|array $params
     * @return array
     */
    public static function Query($QueryString = '', $params = NULL);

    /**
     * function to run raw query without expecting result array on database
     *
     * @param string $QueryString
     * @param null|array $params
     * @return boolean
     */
    public static function unbufferedQuery($QueryString = '', $params = NULL);

    /**
     * get lastinsertid from PDO
     *
     * @return integer|string
     */
    public static function getLastInsertId();

}